<?php $ZGTITLE="页面设置";$baseUrl=$this->assetsUri();$ZGHEAD=<<<S
<link rel="stylesheet" type="text/css" href="{$baseUrl}/css/default.css" media="all">
<script type="text/javascript" src="/i/d/js/zmsun/zmsuncopy.js"></script>
<script type="text/javascript" src="{$baseUrl}/js/default.js"></script>
S;
if(!empty($ZMODEL['isGeneralPage'])){echo'<p style="color:#555;text-align:center;padding:10px;">不可编辑非模块页</p>';return;}$editNameHtm=$editNameBtnHtm=$editTitTipHtm='';if($ZMODEL['reqPageUrl']!==''){if($ZMODEL['pageBaseRoute']=='/'){$reqPageUri=$ZMODEL['pageName']===''?'':"/{$ZMODEL['pageName']}";}else{$reqPageUri="{$ZMODEL['pageBaseRoute']}/{$ZMODEL['pageName']}";}}if($ZMODEL['allowRename']){if($ZMODEL['isCustomPage']){$allowRenameUri=$ZMODEL['pageName'];$prefixUri=$ZMODEL['pageBaseRoute'].'/';$tipTxt='只能是英文字母、数字、“_”、“-”和“.”的组合。';}else{$allowRenameUri=$ZMODEL['pageBaseRoute']=='/'?$ZMODEL['pageName']:substr($ZMODEL['pageBaseRoute'],1).'/'.$ZMODEL['pageName'];$prefixUri="/";$tipTxt="只能是英文字母、数字、“_”、“-”、“/”和“.”的组合，且“/”不能出现在开头和结尾，也不能连续出现。";}$isCustom=intval($ZMODEL['isCustomPage']);$editNameHtm=<<<S
<div class="zmsun_fieldItem assocChangeName_b hidden">
	<label class="itemName">页面地址</label>		
	<div class="subItems">
		<span class="serverName">http://{$_SERVER['SERVER_NAME']}</span>
		<span class="pageBaseRoute">{$prefixUri}</span>
		<input data-is-custom="{$isCustom}" type="text" name="rename_uri" value="{$allowRenameUri}">
		<div class="confirmNameChangeBtn btn-ok blackBtn btn"><button type="button">确定</button></div>
		<div class="cancleNameChangeBtn btn lightGreyBtn"><button type="button">取消</button></div>
		<div class="optTips optTips_prompt">
			<em class="tipIcon"></em>
			<span class="des">$tipTxt</span>
		</div>
	</div>
</div>
S;
$editNameBtnHtm='<div class="editPageNameBtn lightGreyBtn btn"><button type="button">编辑</button></div>';}$editTitTipHtm='<em class="tipIcon"></em><span class="des">页面名称建议不超过10个字。</span>';$showTitT1=$showTitT2=$attachSitenameT1=$attachSitenameT2='';if($ZMODEL['showTitle']){$showTitT1=' checked';}else{$showTitT2=' checked';}if($ZMODEL['attachSitename']){$attachSitenameT1=' checked';}else{$attachSitenameT2=' checked';}$backRepeat0Sec=$backRepeat1Sec=$backRepeat2Sec=$backRepeat3Sec='';if(false!==$key=array_search($ZMODEL['back_repeat'],['no-repeat','repeat','repeat-x','repeat-y'])){$var="backRepeat{$key}Sec";$$var=' checked';}$backPosx0Sec=$backPosx1Sec=$backPosx2Sec='';if(false!==$key=array_search($ZMODEL['back_pos_x'],['left','center','right'])){$var="backPosx{$key}Sec";$$var=' checked';}$backPosy0Sec=$backPosy1Sec=$backPosy2Sec='';if(false!==$key=array_search($ZMODEL['back_pos_y'],['top','center','bottom'])){$var="backPosy{$key}Sec";$$var=' checked';}$backAttach0Sec=$backAttach1Sec='';if(false!==$key=array_search($ZMODEL['back_attachment'],['scroll','fixed'])){$var="backAttach{$key}Sec";$$var=' checked';}$prio0=$prio1=$prio2=$prio3=$prio4=$prio5=$prio6=$prio7=$prio8=$prio9=$prio10='';$prioArr=['0.0','0.1','0.2','0.3','0.4','0.5','0.6','0.7','0.8','0.9','1.0',];if((false!==$key=array_search($ZMODEL['priority'],$prioArr))||false!==$key=array_search(Zmsun\SEO\Sitemap::DEFAULT_PRIORITY,$prioArr)){$var="prio{$key}";$$var=' selected';}$freq0=$freq1=$freq2=$freq3=$freq4=$freq5=$freq6='';$freqArr=['always','hourly','daily','weekly','monthly','yearly','never'];if((false!==$key=array_search($ZMODEL['change_freq'],$freqArr))||false!==$key=array_search(Zmsun\SEO\Sitemap::DEFAULT_CHANGEFREQ,$freqArr)){$var="freq{$key}";$$var=' selected';}$layoutOptStr='';$layoutIndexDirs=new \RecursiveDirectoryIterator($ZMODEL['templatePart']->masterLayoutDir(),\FilesystemIterator::SKIP_DOTS);foreach($layoutIndexDirs as$filename=>$splFileInfo){$infoFile=$filename.'/layout.json';if(file_exists($infoFile)&&$info=json_decode(@file_get_contents($infoFile))){if($info->layout_type!='module')continue;$secStr=$ZMODEL['layoutId']==$info->id ?' selected':'';$layoutOptStr.=sprintf('<option value="%s"%s>%s</option>',$info->id,$secStr,$info->name);}}?> <div class="newpage"><form class="form-default" name="form-default" method="post"><h2>编辑<span class="highlight"><?php echo$ZMODEL['title']?></span>页面属性</h2><input type="hidden" name="page" value="<?php echo$_GET['page'];?>"><div class="zmsun_fieldItem"><label class="itemName">页面组</label><div class="subItems"><input name="property" type="text" value="<?php echo$ZMODEL['propertyName']?>" disabled="disabled"><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">布局页</label><div class="subItems"><select name="master_page"><?=$layoutOptStr ?><option value="" <?php if($ZMODEL['layoutId']==='')echo'selected';?>>无布局</option></select><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面标题</label><div class="subItems"><input class="input-box" name="title" value="<?php echo$ZMODEL['title']?>" type="text"><div class="optTips optTips_prompt"><?php echo$editTitTipHtm ?></div></div></div><div class="zmsun_fieldItem"><label class="itemName">显示页面标题</label><div class="subItems"><div class="subItem"><label><input type="radio" name="show_title" value="1"<?=$showTitT1 ?>><span>是</span></label></div><div class="subItem"><label><input type="radio" name="show_title" value="0"<?=$showTitT2 ?>><span>否</span></label></div><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">是否在浏览器中显示页面标题。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">附加站点名称到标题</label><div class="subItems"><div class="subItem"><label><input type="radio" name="attach_sitename" value="1"<?=$attachSitenameT1 ?>><span>是</span></label></div><div class="subItem"><label><input type="radio" name="attach_sitename" value="0"<?=$attachSitenameT2 ?>><span>否</span></label></div><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">是否在页面标题后添加站点名称。</span></div></div></div><?php if($ZMODEL['reqPageUrl']!==''):?> <div class="zmsun_fieldItem assocChangeName_a"><label class="itemName">页面地址</label><div class="subItems"><span class="serverName">http://<?php echo$_SERVER['SERVER_NAME'];?></span><span class="pageUri"><?=$reqPageUri ?></span><?php echo$editNameBtnHtm ?> <div class="copyUrlBtn lightGreyBtn btn" data-url="http://<?=$_SERVER['SERVER_NAME'].$reqPageUri ?>"><button type="button">复制</button></div><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><?php endif;?>  <?php echo$editNameHtm;?> <div class="zmsun_fieldItem"><label class="itemName">页面背景色</label><div class="subItems"><input class="input-box" name="back_color" value="<?=$ZMODEL['back_color']?>" type="text"><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">可为空，请填写颜色值，如“#FF00FF”。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面背景图片</label><div class="subItems"><input class="input-box" name="back_img" value="<?=$ZMODEL['back_img']?>" type="text"><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">可为空，请填写图片地址。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面背景图平铺</label><div class="subItems"><div class="subItem"><label><input type="radio" name="back_repeat" value="no-repeat"<?=$backRepeat0Sec ?>><span>不平铺</span></label></div><div class="subItem"><label><input type="radio" name="back_repeat" value="repeat"<?=$backRepeat1Sec ?>><span>平铺</span></label></div><div class="subItem"><label><input type="radio" name="back_repeat" value="repeat-x"<?=$backRepeat2Sec ?>><span>水平平铺</span></label></div><div class="subItem"><label><input type="radio" name="back_repeat" value="repeat-y"<?=$backRepeat3Sec ?>><span>垂直平铺</span></label></div><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面背景图滚动</label><div class="subItems"><div class="subItem"><label><input type="radio" name="back_attachment" value="scroll"<?=$backAttach0Sec ?>><span>是</span></label></div><div class="subItem"><label><input type="radio" name="back_attachment" value="fixed"<?=$backAttach1Sec ?>><span>否</span></label></div><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">页面背景是否在拖动页面时滚动。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面背景水平对齐</label><div class="subItems"><div class="subItem"><label><input type="radio" name="back_pos_x" value="left"<?=$backPosx0Sec ?>><span>左</span></label></div><div class="subItem"><label><input type="radio" name="back_pos_x" value="center"<?=$backPosx1Sec ?>><span>中</span></label></div><div class="subItem"><label><input type="radio" name="back_pos_x" value="right"<?=$backPosx2Sec ?>><span>右</span></label></div><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面背景垂直对齐</label><div class="subItems"><div class="subItem"><label><input type="radio" name="back_pos_y" value="top"<?=$backPosy0Sec ?>><span>顶</span></label></div><div class="subItem"><label><input type="radio" name="back_pos_y" value="center"<?=$backPosy1Sec ?>><span>中</span></label></div><div class="subItem"><label><input type="radio" name="back_pos_y" value="bottom"<?=$backPosy2Sec ?>><span>底</span></label></div><div class="optTips optTips_prompt"><em class=""></em><span class="des"></span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">搜索权重</label><div class="subItems"><select name="priority"><option value="0.0"<?=$prio0 ?>>0.0</option><option value="0.1"<?=$prio1 ?>>0.1</option><option value="0.2"<?=$prio2 ?>>0.2</option><option value="0.3"<?=$prio3 ?>>0.3</option><option value="0.4"<?=$prio4 ?>>0.4</option><option value="0.5"<?=$prio5 ?>>0.5</option><option value="0.6"<?=$prio6 ?>>0.6</option><option value="0.7"<?=$prio7 ?>>0.7</option><option value="0.8"<?=$prio8 ?>>0.8</option><option value="0.9"<?=$prio9 ?>>0.9</option><option value="1.0"<?=$prio10 ?>>1.0</option></select><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">搜索引擎使用的页面优先级。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">更新频率</label><div class="subItems"><select name="change_freq"><option value="always"<?=$freq0 ?>>经常</option><option value="hourly"<?=$freq1 ?>>每小时</option><option value="daily"<?=$freq2 ?>>每天</option><option value="weekly"<?=$freq3 ?>>每周</option><option value="monthly"<?=$freq4 ?>>每月</option><option value="yearly"<?=$freq5 ?>>每年</option><option value="never"<?=$freq6 ?>>不再更新</option></select><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">告知搜索引擎页面的更新频率。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面关键字</label><div class="subItems"><textarea rows="5" cols="50" name="keywords"><?php echo$ZMODEL['keywords']?></textarea><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">这将被搜索引擎使用。建议200字以内，每个关键词用英文逗号隔开。</span></div></div></div><div class="zmsun_fieldItem"><label class="itemName">页面描述</label><div class="subItems"><textarea rows="5" cols="50" name="description"><?php echo$ZMODEL['description']?></textarea><div class="optTips optTips_prompt"><em class="tipIcon"></em><span class="des">这将被搜索引擎使用。建议100字以内，最多200字。</span></div></div></div><div class="optt"><div class="saveAllBtn btn-ok blackBtn btn"><button type="button">保存</button></div><div class="cancleAllBtn btn lightGreyBtn"><a href="<?php echo$ZMODEL['cancleUrl']?>">取消</a></div></div></form></div>